﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BLSingTowerMall;
using DTOSingTowerMall;


namespace FacadeSingTowerMall
{
    public class EventHallBookingFacade
    {
        EventHallBookingProcess hallBkProcess = new EventHallBookingProcess();

        public string fValidate(DateTime startDate, DateTime endDate)
        {
            return hallBkProcess.Validate(startDate, endDate);
        }

        public bool fBookEventHall(int hallId, string hallName
                                    ,DateTime startDate, DateTime endDate,decimal totalPrice, string eventTitle, string eventDesc 
                                    ,string userName, string identityNo
                                    , string cmpnyName, string cmpnyAddress
                                    ,string imgPath)
        {
            IEventHallBooking newBooking = new EventHallBooking();
       
            

            newBooking.HallID = hallId;
            //newBooking.HallName = hallName;

            newBooking.EventStartDateTime = startDate;
            newBooking.EventEndDateTime = endDate;
            newBooking.TotalPrice = totalPrice;
            newBooking.EventTitle = eventTitle;
            newBooking.EventDescription = eventDesc;
            newBooking.UserName = userName;
            newBooking.IdentityNo = identityNo;
            
            newBooking.CompanyName = cmpnyName;
            newBooking.CompanyAddress = cmpnyAddress;
  
            //newBooking.BookingDateTime = DateTime.Now;
            newBooking.ImagePath = imgPath;
            
        //Nullable<Decimal> TotalPrice { get; set; }


            hallBkProcess.bookEventHall(newBooking);

            return true;
        }
    }
}
